﻿#region Copyright (C) Sector7 Software Studio. All rights reserved
/*******************************************************************************************
 * Creation
 *      Author:         Wolf Lai
 *      Date:           2013/5/5 星期日 22:01:52
 *      Version:        
 * Modification 
 *      Author: 
 *      Date: 
 *      Description: 
 *      Version:
 *******************************************************************************************/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using Sector7.Framework.Core;
using Sector7.Framework.Enums;

namespace Sector7.Medical.EntityType
{
    /// <summary>
    /// 药品库存实体类
    /// </summary>
    [Serializable()]
    [DataContract]
    public class M7_DrugStock : EntityBase
    {
        #region DBField
        /// <summary>
        /// 获取或设置药品库存编号
        /// </summary>
        [DataMember]
        [DBField(DBFieldType.PrimaryKey)]
        public long StockId { get; set; }

        /// <summary>
        /// 获取或设置药品编号
        /// </summary>
        [DataMember]
        [DBField]
        public long DrugId { get; set; }

        /// <summary>
        /// 获取和设置规格编码
        /// </summary>
        [DataMember]
        [DBField]
        public long SpecId { get; set; }

        /// <summary>
        /// 获取或设置采购批号
        /// </summary>
        [DataMember]
        [DBField]
        public string BatchNumber { get; set; }
        
        /// <summary>
        /// 获取或设置采购批次
        /// </summary>
        [DataMember]
        [DBField]
        public int LotNumber { get; set; }
                
        /// <summary>
        /// 获取或设置库存单位编号
        /// </summary>
        [DataMember]
        [DBField]
        public int UnitId { get; set; }

        /// <summary>
        /// 获取或设置库存数量
        /// </summary>
        [DataMember]
        [DBField]
        public decimal Number { get; set; }

        /// <summary>
        /// 获取或设置生产日期
        /// </summary>
        [DataMember]
        [DBField]
        public DateTime ProducedDate { get; set; }

        /// <summary>
        /// 获取或设置有效日期
        /// </summary>
        [DataMember]
        [DBField]
        public DateTime AvailableDate { get; set; }

        /// <summary>
        /// 获取或设置是否过期
        /// </summary>
        [DataMember]
        [DBField]
        public bool IsOverdue { get; set; }
        #endregion

        #region Extension

        /// <summary>
        /// 获取或设置库存单位
        /// </summary>
        [DataMember]
        public M7_Unit Unit { get; set; }

        #endregion
    }
}
